import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store/store";
import request from "./utils/request";
import ElementUI from "element-ui";
import "element-ui/lib/theme-chalk/index.css";
// import '@/assets/element-ui/theme/index.css';
// import '@/assets/css/common.scss';
import "@/assets/css/base.css";
import "@/utils/filter.js";
import "@/utils/dayjs";

Vue.config.productionTip = false;
Vue.use(request);
Vue.use(ElementUI);

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount("#app");

router.beforeEach((to, from, next) => {
  // chrome
  document.body.scrollTop = 0;
  // firefox
  document.documentElement.scrollTop = 0;
  // safari
  window.pageYOffset = 0;
  next();
});
